<template>
  <view></view>
</template>

<script setup>
  import { onLoad } from '@dcloudio/uni-app';
  import healthCard from '../static/ElectronicHealthCard';
  import healthCardUtil from '@/utils/healthCard/index';

  onLoad(options => {
    init(options);
  });

  async function init(options) {
    console.log('redirectUrl【options】', options);
    const { healthCode, regInfoCode } = options;
    healthCardUtil.showLoad('跳转中');
    // 记录参数
    if (healthCode) {
      healthCard.setHealthCode(healthCode);
    } else if (regInfoCode) {
      healthCard.setRegInfoCode(regInfoCode);
    }
    // 返回到起始页，根据记录的参数进行业务处理
    healthCardUtil.goBack();
  }
</script>
